package com.fzh.bookstore.biz.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzh.bookstore.biz.goods.entity.Goods;
import com.fzh.bookstore.biz.order.entity.OrderGoods;
import com.fzh.bookstore.biz.order.mapper.OrderGoodsMapper;
import com.fzh.bookstore.biz.order.service.OrderGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fang
 * @since 2021-02-25
 */
@Service
public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGoods> implements OrderGoodsService {

    @Override
    public List<Goods> findGoodsByOrderNo(String orderNo) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("order_no",orderNo);
        return baseMapper.selectList(queryWrapper);
    }
}
